/**
 * COPYRIGHT HangZhou Trustway Technology Company Limited
 * All right reserved.
 */
package com.robam.cloud.apicenter.controller;

import com.robam.cloud.apicenter.service.SysConfigService;
import com.robam.cloud.apicenter.service.SysDictService;
import com.robam.cloud.common.bean.apicenter.entity.SysConfigWithBLOBs;
import com.robam.cloud.common.bean.restful.entity.RespMsg;
import com.robam.cloud.log.annotation.OperationLogRecord;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description
 * @Author 薛铁琪
 * @CreateTime 2020-07-23 15:01
 * @Version 1.0
 */
@RestController
@RequestMapping("/apiCenter/")
public class SysConfigController {
    @Autowired
    SysConfigService sysConfigService;
    @Autowired
    SysDictService sysDictService;
    @Autowired
    HttpServletRequest httpServletRequest;

    @ApiOperation(
            value = "根据参数类型查询参数",
            notes = "根据参数类型查询参数")
    @OperationLogRecord(
            describe = "根据参数类型查询参数",
            modularCode = "/apiCenter/getSysConfigByCsdm",
            operationLevel = OperationLogRecord.OperationLevel.OTHER)
    @RequestMapping(
            value = "/getSysConfigByCsdm",
            method = RequestMethod.GET)
    public RespMsg<SysConfigWithBLOBs> getSysConfigByCsdm(@RequestParam String csdm) {
        return RespMsg.success(sysConfigService.getSysConfigByCsdm(csdm));
    }
}
